﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Visit_History_Detail.aspx.cs"
    MasterPageFile="~/MasterPage.master" Inherits="CallRoute_Visit_History_Detail" %>

<%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<%@ Register Src="~/UserControl/CPR_DATA_PAGE.ascx" TagName="CPR_DATA" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>拜访明细</title>
    <script src="../JavaScript/common.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 100%">
        <table id="wsd_inputtable" width="100%">
            <tr>
                <td width="100%" class="tabletitle" colspan="6">
                    拜访信息
                </td>
            </tr>
            <tr>
                <td class="tablefield" style="width: 10%; height: 28px;">
                    门店名称:
                </td>
                <td style="width: 20%">
                    <asp:Label ID="lblCustomer" runat="server"></asp:Label>
                </td>
                <td class="tablefield" style="width: 10%">
                    销售渠道:
                </td>
                <td style="width: 20%">
                    <asp:Label ID="lblChannel" runat="server"></asp:Label>
                </td>
                <td class="tablefield" style="width: 10%">
                    巡店督导:
                </td>
                <td>
                    <asp:Label ID="lblUser" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="tablefield" style="width: 10%">
                    店内时间:
                </td>
                <td style="width: 20%">
                    <asp:Label ID="lblTimeSpan" runat="server"></asp:Label>
                </td>
                <td class="tablefield" style="width: 10%">
                    进店时间:
                </td>
                <td style="width: 20%">
                    <asp:Label ID="lblStart" runat="server"></asp:Label>
                </td>
                <td class="tablefield" style="width: 10%">
                    离店时间:
                </td>
                <td>
                    <asp:Label ID="lblStop" runat="server"></asp:Label>
                </td>
            </tr>
            <tr style="display: none">
                <td class="tablefield" style="width: 10%">
                    经度:
                </td>
                <td style="width: 20%">
                    <asp:Label ID="lbl_longitude" runat="server"></asp:Label>
                </td>
                <td class="tablefield" style="width: 10%">
                    纬度:
                </td>
                <td style="width: 20%">
                    <asp:Label ID="lbl_latitude" runat="server"></asp:Label>
                </td>
                <td class="tablefield" style="width: 10%">
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td class="tablefield" style="width: 10%">
                    拜访备注:
                </td>
                <td colspan="5">
                    <asp:Label ID="lblRemark" runat="server"></asp:Label>
                    &nbsp;&nbsp; &nbsp;
                </td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" width="100%">
                    操作选项
                </td>
            </tr>
            <tr>
                <td class="buttonarea">
                    <asp:Button ID="btnResearch" runat="server" Text="返  回" CssClass="wsd_button2" OnClientClick="javascript:history.back(-1)" />
                </td>
            </tr>
        </table>
        <div style="height: 320px; width: 100%">
            <div id="tabs" class="easyui-tabs" width="100%">
                <div id="tab1" title="指标信息采集" style="padding: 10px; width: 100%">
                    <asp:Repeater ID="rptMeasure" runat="server" OnItemDataBound="rptMeasure_ItemDataBound">
                        <ItemTemplate>
                            <table id="wsd_inputtable" width="100%">
                                <tr>
                                    <td class="tabletitle">
                                        指标类:<%# DataBinder.Eval(Container.DataItem, "MEASURE_NAME")%></td>
                                </tr>
                            </table>
                            <table id="wsd_listtable" width="100%">
                                <tr>
                                    <td style="width: 100%">
                                        <asp:GridView BorderWidth="0" Width="100%" ID="gvMeasureTransation" runat="server"
                                            OnRowDataBound="gv_RowDataBound" AutoGenerateColumns="false" EmptyDataText="没有可显示的数据."
                                            EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                                            EnableEmptyContentRender="true">
                                            <HeaderStyle CssClass="titlist" />
                                            <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                                            <Columns>
                                                <asp:BoundField HeaderText="指标明细" DataField="DETAILS">
                                                    <ItemStyle Width="50%" />
                                                </asp:BoundField>
                                                <asp:BoundField HeaderText="采集结果" DataField="VALUE">
                                                    <ItemStyle Width="50%" />
                                                </asp:BoundField>
                                            </Columns>
                                            <PagerSettings Mode="NumericFirstLast" PageButtonCount="30" />
                                            <RowStyle CssClass="evenline" />
                                            <AlternatingRowStyle CssClass="oddline" />
                                        </asp:GridView>
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <div id="tab2" title="分销数据查看" style="padding: 10px; width: 100%">
                    <asp:UpdatePanel UpdateMode="Conditional" ID="UPPromotion" runat="server">
                        <ContentTemplate>
                            <table id="wsd_listtable" width="100%">
                                <tr>
                                    <td style="width: 100%">
                                        <uc2:CPR_DATA runat="server" ID="CPR_BRAND" />
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
                <div id="tab3" title="照片回顾" style="padding: 10px; width: 100%">
                    <table id="wsd_inputtable">
                        <tr>
                            <td width="100%" class="tabletitle">
                                照片类型: 
                                <asp:DropDownList ID="ddlPhotoType" runat="server" OnSelectedIndexChanged="ddlPhotoType_SelectedIndexChanged"
                                    AutoPostBack="True">
                                </asp:DropDownList>
                            </td>
                        </tr>
                    </table>
                    <table id="wsd_listtable" width="100%">
                        <tr>
                            <td style="width: 100%">
                                <asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <asp:DataList runat="server" RepeatColumns="4" ItemStyle-HorizontalAlign="Center"
                                            EmptyDataText="没有可显示的数据." RepeatDirection="Horizontal" RepeatLayout="Table" Width="100%"
                                            ID="dlPhotos" OnItemDataBound="Unnamed1_ItemDataBound">
                                            <ItemTemplate>
                                                <a runat="server" id="anchor">
                                                    <asp:Image ID="img" runat="server" Width="80" Height="100" />
                                                    <br />
                                                    <asp:Label runat="server" ID="lblDate">拍摄时间:<%# Jumpton.SFA.Server.BusinessRule.BusinessLogic.GetDateTime(Eval("PHOTODATE").ToString(), "yyyyMMddHHmmss", "yyyy-MM-dd HH:mm:ss")%></asp:Label><br />
                                                </a>
                                            </ItemTemplate>
                                        </asp:DataList>
                                    </ContentTemplate>
                                    <Triggers>
                                        <asp:AsyncPostBackTrigger ControlID="ddlPhotoType" EventName="SelectedIndexChanged" />
                                    </Triggers>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="tab4" title="巡店数据录入" style="padding: 10px; width: 100%">
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                            <table width="100%">
                                <tr style="height: 30px">
                                    <td class="tablefield">
                                        试吃人数:
                                    </td>
                                    <td>
                                        <input id="txtTastePeople" type="text" class="default" runat="server" maxlength="20" />
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtTastePeople"
                                            ValidationExpression="^[1-9]{1}[\d]*$" runat="server" Display="None" ErrorMessage="请输入正确的数字。"></asp:RegularExpressionValidator>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTastePeople"
                                            Display="None" ErrorMessage="请输入正确的数字。"></asp:RequiredFieldValidator>
                                        <br />
                                    </td>
                                    <td class="tablefield">
                                        购买人数:
                                    </td>
                                    <td nowrap="nowrap">
                                        <asp:TextBox ID="txtBuyNo" class="default" runat="server"></asp:TextBox>
                                        &nbsp;
                                    </td>
                                    <td class="tablefield">
                                        试吃面口味:
                                    </td>
                                    <td>
                                        <input id="txtTaste" type="text" class="default" runat="server" maxlength="20" />
                                    </td>
                                </tr>
                                <tr style="height: 30px">
                                    <td nowrap="nowrap" class="tablefield">
                                        试吃面规格:
                                    </td>
                                    <td nowrap="nowrap" class="style1">
                                        <asp:TextBox ID="txtTasteNoodleType" class="default" runat="server" MaxLength="18"></asp:TextBox>
                                        <br />
                                    </td>
                                    <td class="tablefield">
                                        试吃面数量:
                                    </td>
                                    <td nowrap="nowrap">
                                        <input id="txtTasteNoodleNo" type="text" class="default" runat="server" maxlength="20" />
                                        <br />
                                    </td>
                                    <td class="tablefield" nowrap="nowrap">
                                        赠品名称:
                                    </td>
                                    <td nowrap="nowrap">
                                        <input id="txtGiftName" type="text" class="default" runat="server" maxlength="40" />
                                        <br />
                                    </td>
                                </tr>
                                <tr style="height: 30px">
                                    <td class="tablefield">
                                        赠品数量:
                                    </td>
                                    <td nowrap="nowrap" class="style1">
                                        <input id="txtGiftNo" type="text" runat="server" class="default" maxlength="20" />
                                    </td>
                                    <td class="tablefield">
                                        袋面销量:
                                    </td>
                                    <td nowrap="nowrap" class="style1">
                                        <input id="txtBagSalesNo" type="text" runat="server" class="default" maxlength="20" />
                                    </td>
                                    <td class="tablefield">
                                        容器面销量:
                                    </td>
                                    <td nowrap="nowrap" class="style1">
                                        <input id="txtContainerSalesNo" type="text" runat="server" class="default" maxlength="20" />
                                    </td>
                                </tr>
                            </table>
                            <div>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                    <table id="Table2">
                        <tr style="height: 30px">
                            <td class="buttonarea">
                                <asp:Button ID="btnSave" runat="server" class="wsd_button2" Text="提  交" OnClick="btnSave_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        //        $(function () {
        //            var max, a, b, c;
        //            a = document.getElementById('#tab1').offsetHeight;
        //            b = document.getElementById('#tab2').offsetHeight;
        //            c = document.getElementById('#tab3').offsetHeight;

        //            max = a > b ? a : b;
        //            max = max > c ? max : c;
        //            $('#tabs').height(max); alert(max);
        //        });
        function txtName_onclick() {

        }

    </script>
</asp:Content>
